#pragma once

namespace ja2{ namespace sgp
{
	//! Input atom.
	class InputAtom
	{
		// Enums
	public:
		//! Event type.
		enum EventType
		{
			ET_NONE = 0,
			ET_KEY_DOWN = 0x0001,
			ET_KEY_UP = 0x0002,
			ET_KEY_REPEAT = 0x0004,
			ET_LEFT_BUTTON_DOWN = 0x0008,
			ET_LEFT_BUTTON_UP = 0x0010,
			ET_LEFT_BUTTON_DBL_CLK = 0x0020,
			ET_LEFT_BUTTON_REPEAT = 0x0040,
			ET_RIGHT_BUTTON_DOWN = 0x0080,
			ET_RIGHT_BUTTON_UP = 0x0100,
			ET_RIGHT_BUTTON_REPEAT = 0x0200,
			ET_MOUSE_POS = 0x0400,
			ET_MOUSE_WHEEL = 0x0800
		};

		// Attributes
	public:
		//! Time stamp when event was received.
		std::uint_least32_t m_TimeStamp;
		//! Is shift down.
		bool m_ShiftDown;
		//! Is ctrl down.
		bool m_CtrlDown;
		//! Is alt down.
		bool m_AltDown;
		//! Mouse X position.
		/*!
			--REFERENCE--: uiParam & 0x0000ffff
		*/
		std::int_least16_t m_MouseXPos;
		/*!
			--REFERENCE--: uiParam >> 16
		*/
		//! Mouse Y position.
		std::int_least16_t m_MouseYPos;
		//! Event type.
		EventType m_Event;
		//! Wheel delta.
		std::uint_least16_t m_WheelDelta;

		// Constructor
	public:
		InputAtom(std::uint_least32_t TimeStamp = 0, EventType Event = ET_NONE, std::int_least16_t MouseX = 0, std::int_least16_t MouseY = 0, bool IsShiftDown = false, bool IsCtrlDown = false, bool IsAltDown = false, std::uint_least16_t WheelDelta = 0);
	};
} /*sgp*/} /*ja2*/
